/*###################################################################*
#
# MP (Mitchell Pell) Base - CrossPlatform Base Utilities.
# Copyright (C) 2014  Mitchell Pell
# 
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
####################################################################*/

#ifndef BASE_COLLECTION_H
#define BASE_COLLECTION_H
#include <vector>

#define MP_WHA_TADA 45

namespace mp_base{
	namespace interfaces{

		/*!----------------------------------------------------------------
		*	@class		Collection
		*	@brief		Wrapper class for a vector array using a template
		*
		*	@author		Mitchell Pell
		*	@date		9/27/2013
		*	@version	1.0
		*
		-----------------------------------------------------------------*/
		template <class Item>
		class Collection
		{
		protected:
			std::vector<Item> m_collection;
		public:
			Collection(){}
			virtual ~Collection(){}
			void push_back(Item item){m_collection.push_back(item);}
			Item pop_back(){return m_collection.pop_back();}
			typename std::vector<Item>::iterator begin()
				{return m_collection.begin();}
			typename std::vector<Item>::iterator end()
				{return m_collection.end();}
			void erase(typename std::vector<Item>::iterator it)
				{m_collection.erase(it); }
			typename std::vector<Item>::size_type size()
				{return m_collection.size();}
			Item& operator[] (unsigned i){ return m_collection[i]; }
		};
	}
}
#endif